<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
 

		<title>My JSP 'write_Article.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript"  src="${pageContext.request.contextPath}/ckeditor/ckeditor.js"></script>
	</head>

	<body>
	 <h1>写博客</h1>
	 <hr/>
		<html:form action="/admin/blogs" method="post">
			<table>
				<tr>
					<td width="57">
						主题：
					</td>
					<td width="146">
						<html:select property="origin">
							<c:forEach items="${origins}" var="org">

								<option value="${org.id }">
									${org.name }
								</option>
							</c:forEach>
						</html:select>
					</td>
					<td width="535">
						<html:text property="title" style="width: 400px;" />
					</td>
				</tr>
				<tr>
					<td>
						分类：
					</td>
					<td>
						<html:select property="category">
							<c:forEach items="${categories}" var="catg">
								<option value="${catg.id }">
									${catg.name }
								</option>
							</c:forEach>
						</html:select>
					</td>
					<td>

						<html:text property="keyWords" style="width: 250px;"></html:text>

					</td>

				</tr>
				<tr>
					<td colspan="3">

						<p>
							<html:textarea property="content" styleId="editor1" cols="80"
								rows="10">
							&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;
							</html:textarea>
							<script type="text/javascript" >
	CKEDITOR.replace( 'editor1',
    {
        filebrowserBrowseUrl : '${pageContext.request.contextPath}/admin/upload_manager',
        filebrowserUploadUrl : '${pageContext.request.contextPath}/fileupload',
        filebrowserImageWindowWidth : '640',
        filebrowserImageWindowHeight : '480'
    });

</script>
						</p>
						<p>
							<input type="submit" value="保存" />
							<input type="reset" value="清空" />
							<input type="hidden" name="method" value="save" />

						</p>

					</td>
				</tr>
			</table>
		</html:form>
	</body>
</html>
